// Author: Domien Nowicki, Bjorn Schobben

#ifndef GLRENDERERWIDGET_H
#define GLRENDERERWIDGET_H

#include <QGLWidget>
#include "Pixel.h"
#include "RendererWidget.h"
#include "GLRendererWidgetImpl.h"
#include "Poly.h"

class GLRendererWidget : public RendererWidget
{
    Q_OBJECT

public:
    GLRendererWidget(QWidget *parent = 0, const QGLWidget * shareWidget = 0, Qt::WFlags flags = 0);
    virtual ~GLRendererWidget();

	void SetPixel(unsigned int x, unsigned int y, const Pixel& pixel);
	void SetPixel(unsigned int x, unsigned int y, unsigned char red, unsigned char green, unsigned char blue);
	Pixel GetPixel(unsigned int x, unsigned int y) const;
	unsigned int GetHeight() const;
	unsigned int GetWidth() const;
	void DrawPolygon(const Poly& poly);

	void Update();

private:
	GLRendererWidgetImpl *glWidget;
};

#endif // GLRENDERERWIDGET_H
